<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('新增账户别名')"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-operator-add">
        <div class="form-group">
            <label class="col-sm-3 control-label">账户别名：</label>
            <div class="col-sm-8">
                <input id="accountAlias" name="accountAlias" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">描述：</label>
            <div class="col-sm-8">
                <input id="description" name="description" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">类型：</label>
            <div class="col-sm-8">
                <input id="type" name="type" class="form-control" type="text" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">有效时间：</label>
            <div class="col-sm-8">
                <input id="effectiveDate" name="effectiveDate" class="form-control" type="date" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">失效时间：</label>
            <div class="col-sm-8">
                <input id="disableDate" name="disableDate" class="form-control" type="date" required>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">生效标识：</label>
            <div class="col-sm-8">
                <select id="enabledFlag" name="enabledFlag" class="form-control">
                    <option value="Y">Y</option>
                    <option value="N">N</option>
                </select>
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "accountAlias"

    var now = new Date();

    var year = now.getFullYear(); //得到年份

    var month = now.getMonth()+1;//得到月份

    var date = now.getDate();//得到日期

    // var day = now.getDay();//得到周几

    var hour= now.getHours();//得到小时数

    var minute= now.getMinutes();//得到分钟数

    var second= now.getSeconds();//得到秒数

    document.querySelector('#effectiveDate').value = '';

    function submitHandler(){
        if($.validate.form()){
            $.operate.save(prefix + "/addSave", $('#form-operator-add').serialize());
        }
    }
</script>
</body>
</html>